programming4us
           
 
 
Windows

Windows 7 : Controlling and Customizing Your Website (part 3) - Working Without a Default Document

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
3/23/2011 9:31:49 AM

Working Without a Default Document

Using a default document is usually a good idea because it enables users to access your site without knowing the name of any file. However, for security reasons, you might want to allow access to the site only to users who know a specific filename on the site (for example, through a URL that you’ve provided). In that case, you have two choices:

  • Don’t include a file that uses one of the default document names.

  • Disable the default documents.

Here are the steps to follow to disable default documents for your website:

1.
Open IIS Manager.

2.
Open the Computer, Sites branch (where Computer is the name of the computer running IIS).

3.
Select Default Web Site.

4.
Click Features View.

5.
Double-click the Default Document icon to display the Default Document page.

6.
In the Actions pane, click Disable. IIS Manager disables the default documents.

7.
Click the Back button to return to the website’s main page in IIS Manager.

At this point, you may still have a security risk because it’s possible that any anonymous user who surfs to the site without specifying a filename will see a listing of all the files and subfolders in the website’s home folders! An example is shown in Figure 3.

Figure 3. If you’ve disabled the default documents but directory browsing is enabled, anonymous users who don’t specify a filename see a listing of the contents of the home folder.

Note

In the directory listing shown in Figure 3, you see a file named web.config. This is a file created by IIS Manager to store some of the settings you’ve been working with so far, including the name and order the default documents and whether default documents are enabled.


This is called directory browsing, and it’s normally disabled in IIS 7.5, but just to make sure, follow these steps:

1.
Open IIS Manager.

2.
Open the Computer, Sites branch (where Computer is the name of the computer running IIS).

3.
Select Default Web Site.

4.
Click Features View.

5.
Double-click the Directory Browsing icon to display the Directory Browsing page.

6.
In the Actions pane, look for the message Directory browsing has been disabled, as shown in Figure 4. If you see the message, skip to step 8.

Figure 4. Make sure that your website has directory browsing disabled.

7.
If you do not see the message, click the Disable link to disable directory browsing. IIS Manager disables directory browsing for the site.

8.
Click the Back button to return to the website’s main page in IIS Manager.

Now when an anonymous user surfs to your website without specifying a filename (and assuming you still have default documents disabled), that person sees the error message shown in Figure 5.

Figure 5. If you’ve disabled default documents and directory browsing, anonymous users who don’t specify a filename see the error message shown here.
Other -----------------
- Windows 7 : Adding Folders and Files to the Default Website (part 3) - Adding a Folder to the Default Website
- Windows 7 : Adding Folders and Files to the Default Website (part 2) - Changing the Default Website Home Page
- Windows 7 : Adding Folders and Files to the Default Website (part 1) - Setting Permissions on the Default Website Folder
- Turning Windows 7 into a Web Server : Understanding the Default Website
- Turning Windows 7 into a Web Server : Accessing Your Website
- Windows 7 : Installing Internet Information Services
- Windows 7 : Using Virtual Private Network Connections
- Windows 7 : Using Dynamic DNS to Access Your Network & Configuring a Network Computer for Remote Administration
- Windows 7 : Connecting to a Remote Desktop via the Internet
- Windows 7 : Connecting to the Remote Desktop (part 2) - Making an Advanced Connection
- Windows 7 : Connecting to the Remote Desktop (part 1) - Making a Basic Connection
- Windows 7 : Setting Up the Remote Computer as a Host (part 2) - Configuring XP to Act as a Remote Desktop Host
- Windows 7 : Setting Up the Remote Computer as a Host (part 1) - Configuring Windows 7 or Vista to Act as a Remote Desktop Host
- Windows 7 : Working with Network Files Offline (part 6) - Dealing with Synchronization Conflicts
- Windows 7 : Working with Network Files Offline (part 5) - Synchronizing Your Offline Files
- Windows 7 : Working with Network Files Offline (part 4) - Working with Network Files While You’re Offline
- SOA with .NET and Windows Azure : WCF Discovery (part 3) - Discovery Proxies for Managed Discovery & Implicit Service Discovery
- SOA with .NET and Windows Azure : WCF Discovery (part 2) - Locating a Service Ad Hoc & Sending and Receiving Service Announcements
- SOA with .NET and Windows Azure : WCF Discovery (part 1) - Discovery Modes
- Windows 7 : Working with Network Files Offline (part 3) - Prohibiting a Network Folder from Being Made Available Offline & Encrypting Offline Files
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us